<template>
  <div class="suggestion-list">
    <el-card>
      <template #header>
        <div class="card-header">
          <span>建议列表</span>
          <el-button type="primary" @click="handleAdd">新增建议</el-button>
        </div>
      </template>
      
      <el-table :data="suggestionList" v-loading="loading" style="width: 100%">
        <el-table-column prop="title" label="建议标题" />
        <el-table-column prop="content" label="建议内容" show-overflow-tooltip />
        <el-table-column prop="suggester" label="建议人" />
        <el-table-column prop="category" label="建议类别" />
        <el-table-column prop="status" label="处理状态" />
        <el-table-column prop="createTime" label="提交时间" />
        <el-table-column label="操作" width="200">
          <template #default="scope">
            <el-button size="small" @click="handleEdit(scope.row)">编辑</el-button>
            <el-button size="small" @click="handleDetail(scope.row)">详情</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'

const loading = ref(false)
const suggestionList = ref([])

const handleAdd = () => {
  // 新增建议
}

const handleEdit = (row: any) => {
  // 编辑建议
}

const handleDetail = (row: any) => {
  // 查看建议详情
}

onMounted(() => {
  // 加载建议列表
})
</script>

<style scoped>
.suggestion-list {
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style> 